﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data;

namespace WindowsFormsApplication3.Datalayer
{
   static class DbManager
    {

       public static void jobcomboboxload()
       {

           OleDbConnection oleDbConnection1 = new System.Data.OleDb.OleDbConnection(Program.ConnStr);
           oleDbConnection1.Open();
           OleDbCommand oleDbCommand1 = new System.Data.OleDb.OleDbCommand("Select jobpk,jobcode from  jobcodemastertable", oleDbConnection1);
           OleDbDataReader reader = oleDbCommand1.ExecuteReader();
           DataTable dt = new DataTable();

           dt.Columns.Add("jobpk", typeof(int));
           dt.Columns.Add("jobcode", typeof(string));
           dt.Load(reader);
         //  cmbjobcode.ValueMember = "jobpk";
         //  cmbjobcode.DisplayMember = "jobcode";
          // cmbjobcode.DataSource = dt.DefaultView;

           oleDbConnection1.Close();

       }
    }
}
